'use strict';

var CustomerModule = angular.module('CustomerModule', ['ngResource','ngRoute', 'MapModule']);

CustomerModule.config(function($routeProvider) {

  $routeProvider.
      when('/', {
        controller: 'RestaurantsController',
        templateUrl: 'customer/views/restaurants.html'
      }).
      when('/menu/:restaurantId', {
        controller: 'MenuController',
        templateUrl: 'customer/views/menu.html'
      }).
      when('/checkout', {
        controller: 'CheckoutController',
        templateUrl: 'customer/views/checkout.html'
      }).
      when('/thank-you', {
        controller: 'ThankYouController',
        templateUrl: 'customer/views/thank-you.html'
      }).
      when('/customer', {
        controller: 'CustomerController',
        templateUrl: 'customer/views/customer.html'
      }).
      when('/who-we-are', {
        templateUrl: 'customer/views/who-we-are.html'
      }).
      when('/how-it-works', {
        //templateUrl: 'customer/views/how-it-works.html',
        	controller: function ($scope){
        		console.log("aca estoy");
        		$("#myModal").modal('show');
        	}
      }).
      when('/help', {
        templateUrl: 'customer/views/help.html'
      }).
      when('/map', {
    	  controller: 'MapController',
          templateUrl: 'customer/views/map.html'          
      }).when('/logout', {
        controller: function($http){
    		console.log("hey ");

        	$http.get('/api/seller/logout');
        	$("#myModal").modal('show');
        }
      });
});
